﻿/**
* ...
* @author Fabien ANTOINE
*/

package xul.elem;

import xul.elem.XulElement;

class TextBox extends XulElement
{
	public function new( ?o:Dynamic ) { super( o ); }
	
	public var cols:Null<Int>;
	public var disabled:Null<Bool>;
	public var hidespinbuttons:Null<Bool>;
	public var maxlength:Null<Int>;
	public var multiline:Null<Bool>;
	public var onchange:Null<String>;
	public var oninput:Null<String>;
	public var preference:Null<String>;
	public var readonly:Null<Bool>;
	public var rows:Null<Int>;
	public var size:Null<Int>;
	public var tabindex:Null<Int>;
	public var timeout:Null<Int>;
	public var type:Null<TextBoxType>;
	public var value:Null<String>;
	public var wrap:Null<String>;

	// Firefox 2.0.0.2
	public var spellcheck:Null<Bool>;
	
	// Firefox 3
	public var decimalplaces:Null<Int>;
	// public var empty:Null<Bool>;  ...hem... 2 different uses of this attribute in XulElement and TextBox
	public var emptytext:Null<String>;
	public var increment:Null<Int>;
	public var label:Null<String>;
	public var max:Null<Int>;
	public var min:Null<Int>;
	public var newlines:Null<NewLineType>;
	public var wraparound:Null<Bool>;
	
	// TODO: autocomplete attributes
}

enum TextBoxType
{
	autocomplete;
	password;
	timed;
	
	// Firefox 3
	number;
}

enum NewLineType
{
	pasteintact;
	pastetofirst;
	replacewithcommas;
	replacewithspaces;
	strip;
	stripsurroundingwhitespace;
}